const routes = {
	'home/setup_get': 'home_controller@getSetup',
	'passport/phone': 'passport_controller@getPhone',
	'passport/my_detail': 'passport_controller@getMyDetail',
	'passport/edit_base': 'passport_controller@editBase',

	'admin/home': 'admin/admin_home_controller@adminHome',
	'admin/clear_cache': 'admin/admin_home_controller@clearCache',

	'admin/login': 'admin/admin_mgr_controller@adminLogin',
	'admin/mgr_list': 'admin/admin_mgr_controller@getMgrList',
	'admin/mgr_insert': 'admin/admin_mgr_controller@insertMgr',
	'admin/mgr_del': 'admin/admin_mgr_controller@delMgr',
	'admin/mgr_detail': 'admin/admin_mgr_controller@getMgrDetail',
	'admin/mgr_edit': 'admin/admin_mgr_controller@editMgr',
	'admin/mgr_status': 'admin/admin_mgr_controller@statusMgr',
	'admin/mgr_pwd': 'admin/admin_mgr_controller@pwdMgr',
	'admin/log_list': 'admin/admin_mgr_controller@getLogList',
	'admin/log_clear': 'admin/admin_mgr_controller@clearLog',

	'admin/setup_set': 'admin/admin_setup_controller@setSetup',
	'admin/setup_set_content': 'admin/admin_setup_controller@setContentSetup',
	'admin/setup_qr': 'admin/admin_setup_controller@genMiniQr',
	'admin/setup_get': 'admin/admin_setup_controller@getSetup',

	'news/list': 'news_controller@getNewsList',
	'news/view': 'news_controller@viewNews',

	'admin/news_list': 'admin/admin_news_controller@getAdminNewsList',
	'admin/news_insert': 'admin/admin_news_controller@insertNews',
	'admin/news_detail': 'admin/admin_news_controller@getNewsDetail',
	'admin/news_edit': 'admin/admin_news_controller@editNews',
	'admin/news_update_forms': 'admin/admin_news_controller@updateNewsForms',
	'admin/news_update_pic': 'admin/admin_news_controller@updateNewsPic',
	'admin/news_del': 'admin/admin_news_controller@delNews',
	'admin/news_sort': 'admin/admin_news_controller@sortNews',
	'admin/news_status': 'admin/admin_news_controller@statusNews',

	'admin/white_list': 'admin/admin_white_controller@getAdminWhiteList',
	'admin/white_insert': 'admin/admin_white_controller@insertWhite',
	'admin/white_detail': 'admin/admin_white_controller@getWhiteDetail',
	'admin/white_edit': 'admin/admin_white_controller@editWhite',
	'admin/white_del': 'admin/admin_white_controller@delWhite',
	'admin/white_sort': 'admin/admin_white_controller@sortWhite',
	'admin/white_status': 'admin/admin_white_controller@statusWhite',

	'flow/list': 'flow_controller@getFlowList',
	'flow/my_list': 'flow_controller@getMyFlowList',
	'flow/my_detail': 'flow_controller@getMyFlowDetail',
	'flow/my_insert': 'flow_controller@insertMyFlow',
	'flow/my_del': 'flow_controller@delMyFlow',
	'flow/my_status': 'flow_controller@statusMyFlow',

	'admin/flow_list': 'admin/admin_flow_controller@getAdminFlowList',
	'admin/flow_insert': 'admin/admin_flow_controller@insertFlow',
	'admin/flow_detail': 'admin/admin_flow_controller@getFlowDetail',
	'admin/flow_edit': 'admin/admin_flow_controller@editFlow',
	'admin/flow_del': 'admin/admin_flow_controller@delFlow',
	'admin/flow_sort': 'admin/admin_flow_controller@sortFlow',
	'admin/flow_status': 'admin/admin_flow_controller@statusFlow',

	'knowledge/list': 'knowledge_controller@getKnowledgeList',
	'knowledge/detail': 'knowledge_controller@getKnowledgeDetail',
	'knowledge/insert': 'knowledge_controller@insertKnowledge',
	'knowledge/edit': 'knowledge_controller@editKnowledge',
	'knowledge/del': 'knowledge_controller@delKnowledge',
	'knowledge/status': 'knowledge_controller@statusKnowledge',
	
	// PLM系统控制器路由
	'system/check_db': 'system_controller@checkDb',
	'system/init_db': 'system_controller@initDb',
	
	// PLM项目路由
	'research_project/create': 'research_project_controller@createProject',
	'research_project/list': 'research_project_controller@getProjectList',
	'research_project/detail': 'research_project_controller@getProjectDetail',
	'research_project/update': 'research_project_controller@updateProject'
};

console.log('Routes loaded:', Object.keys(routes));

// PLM项目路由
const plmRouter = [
	// 项目路由
	'home/index',   // 首页 
	'user/index',   // 用户 
	'admin/index',  // 管理员 
	'project/index',// 项目
	'research/index', // 研发 
	'task/index',   // 任务 
	'flow/index',   // 流程 
	'resource/index', // 资源  
	'research_project/index', // 研发项目基础接口 
	'bom/index',    // BOM 
	'supplier/index', // 供应商
	'system/index', // 新增：系统接口
];

module.exports = routes; 